<div ng-controller="AddSafetyModalCtrl" class="clearfix details">
    <div class="row wrapper-md">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading font-bold"><span>{{modalName}}</span>
                    <button class="btn btn-default pull-right m-t-n-7" ng-click="goBack()"><i class="fa fa-reply"></i> 返回</button>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal form-validation" name="addForm">
                        <div class="search-box m-t-md" data-ng-include="'/statics/tpl/assets/infrastructure/basicInfo.html'"></div>
                        <div class="search-box m-t-md">
                            <div class="legend">配置信息</div>
                            <div class="search-content">
                                <div class="form-group">
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>数据中心：</label>
                                        <select class="form-control" name="centerId" ng-change="loadSelectData(0,itemData.dcId)" validator="required" ng-model="itemData.dcId" ng-disabled="sourceDisabled">                                            <option value="">--请选择--</option>
                                            <option ng-repeat="item in dataCenterData" ng-selected="item.id == itemData.dcId" value="{{item.id}}" ng-bind="item.name"></option>
                                        </select>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>机房：</label>
                                        <select class="form-control" name="roomId" ng-change="loadSelectData(1,itemData.roomId)" validator="required" ng-model="itemData.roomId" ng-disabled="sourceDisabled">                                            <option value="">--请选择--</option>
                                            <option ng-repeat="item in roomData" ng-selected="item.id == itemData.roomId" value="{{item.id}}" ng-bind="item.name"></option>
                                        </select>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>机柜：</label>
                                        <select class="form-control"   name="rackId" validator="required" ng-model="itemData.rackId" ng-disabled="sourceDisabled">                                            <option value="">--请选择--</option>
                                            <option ng-repeat="item in cabinetData" ng-selected="item.id == itemData.rackId" value="{{item.id}}" ng-bind="item.name"></option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>名称：</label>
                                        <input type="text" name="name" class="form-control" ng-model="itemData.name" validator="required,name" ng-disabled="isDetail"/>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>设备类型：</label>
                                        <select class="form-control" ng-model="itemData.type" ng-disabled="isDetail"  ng-change="spider.relations(itemData.type)">
                                            <option ng-repeat="(key,item) in typeData" ng-selected="itemData.type==key" value="{{key}}" ng-bind="item"></option>
                                        </select>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label">服务IP地址：</label>
                                        <input type="text" name="serviceIp" class="form-control" ng-model="itemData.serviceIp" validator="ip_opt" ng-disabled="isDetail"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>管理账户：</label>
                                        <input type="text" name="account" class="form-control" ng-model="itemData.account" validator="required,account" ng-disabled="isDetail"/>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label"><span>*</span>管理密码：</label>
                                        <input class="form-control" name="osPassword"  maxlength="18" validator="required,passwords" ng-model="itemData.password" type="{{showPass_os?'text':'password'}}" ng-disabled="isDetail"/>
                                        <span class="eye" ng-class="{'eye-show':itemData.password}" ng-click="showPassword('showPass_os')"></span>
                                    </div>
                                    <div class="col-md-4 input-error-info">
                                        <label class="control-label">端口信息：</label>
                                        <input type="text" name="servicePort" class="form-control" ng-model="itemData.servicePort" validator="port_opt" ng-disabled="isDetail"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-12 input-error-info">
                                        <label class="control-label m-t-n-70">备注：</label>
                                        <textarea class="form-control" name="remark" placeholder="备注" ng-model="itemData.remark" maxlength="256" ng-disabled="isDetail"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="search-box m-t-md" data-ng-include="'/statics/tpl/assets/infrastructure/controlInfo.html'"></div>
                        <!--<div class="search-box m-t-md" ng-show="!isDetail" >-->
                            <!--<div class="row" ng-spider-common="" spider-data="spiderData" spider="$parent.spider" ng-if="isDataShow"></div>-->
                        <!--</div>-->
                    </form>
                    <div class="col-md-12 m-t-md m-b-sm btn-list" ng-hide="isDetail">
                        <div class="col-md-6"><button type="submit" class="btn btn-info" validation-submit="addForm" ng-disabled="addForm.$invalid||isLoadingActive" ng-click="save()">确认</button></div>
                        <div class="col-md-6"><button class="btn btn-cancel" ng-click="goBack()">取消</button></div>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class=" m-t-md" ng-show="isDetail">-->
            <!--<div class="legend">关系信息</div>-->
            <!--<div class="row" ng-simple-assets-graph="" node-data="nodeData" ng-if="isDataLoad" style="width: 100%;height: 600px">-->

            <!--</div>-->
        <!--</div>-->
    </div>
</div>